package com.pzsh.constant;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * @program: UnionPayServers
 * @description: 微信第三方配置信息
 * @author: bite
 * @create: 2019-07-21 10:25
 **/
@Component
public class ComponentConstants {
    /**
     * redis key 最新一个代码库模版id
     */
    public static  String LAST_TEMPLSTES_ID_REDIS_KEY = "component:lastTemplatesId";

    /**
     * 授权事件类型 验证票据component_verify_ticket
     */
    public static String TICKET_INFO_TYPE = "component_verify_ticket";
    /**
     * 授权事件类型 授权成功通知
     */
    public static String AUTHORIZED_INFO_TYPE = "authorized";
    /**
     * 授权事件类型 取消授权通知
     */
    public static String UNAUTHORIZED_INFO_TYPE = "unauthorized";
    /**
     * 授权事件类型 授权更新通知
     */
    public static  String UPDATEAUTHORIZED_INFO_TYPE = "updateauthorized";


    /**
     * redis key 验证票据component_verify_ticket
     */
    public static  String TICKET_REDIS_KEY = "component:componentVerifyTicket";
    /**
     * redis key 第三方平台接口的调用凭据component_access_token
     */
    public static String ACCESS_TOKEN_REDIS_KEY = "component:componentAccessToken";

    /**
     * %s: 授权方 appid
     * redis key 公众号/小程序 接口调用令牌 authorizer_access_token
     */
    public static String AUTH_ACCESS_TOKEN_REDIS_KEY = "component:%s:authorizerAccessToken";
    /**
     * %s: 授权方 appid
     * redis key 公众号/小程序 刷新令牌 authorizer_refresh_token
     */
    public static String AUTH_REFRESH_TOKEN_REDIS_KEY = "component:%s:authorizerRefreshToken";
    /**
     * %s: 授权方 appid
     * redis key 公众号/小程序 授权给开发者的权限集列表 func_info
     */
    public static String AUTH_FUNC_REDIS_KEY = "component:%s:funcInfo";

}
